import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {JlbOreLogListComponent} from './jlb-ore-log-list/jlb-ore-log-list.component';
import {JlbOreLogDetailComponent} from './jlb-ore-log-detail/jlb-ore-log-detail.component';
import {SharedModule} from '../../shared/shared.module';
import {RechargeComponent} from './recharge/recharge.component';
import {ActiveRecordComponent} from './active-record/active-record.component';

const routes: Routes = [
  {path: '', redirectTo: ' record'},
  {
    path: 'record', children: [
      {path: '', redirectTo: 'list'},
      {path: 'list', component: JlbOreLogListComponent},
      {path: 'detail/:code', component: JlbOreLogDetailComponent}
    ]
  },
  {path: 'recharge', component: RechargeComponent},
  {path: 'actives', component: ActiveRecordComponent},
];

@NgModule({
  imports: [
    SharedModule.forRoot(),
    RouterModule.forChild(routes)
  ],
  declarations: [
    JlbOreLogListComponent,
    JlbOreLogDetailComponent,
    RechargeComponent,
    ActiveRecordComponent,
  ],
})
export class FinanceModule {
}
